package com.vonchange.water.util;

import org.slf4j.helpers.MessageFormatter;

public class StringUtil {
    public  static boolean isEmpty(String str){
        if(null==str||"".equals(str.trim())){
            return true;
        }
        return false;
    }
    public static String format(String messageTemplate, Object... parameters) {
        return MessageFormatter.arrayFormat(messageTemplate, parameters).getMessage();
    }
    public static String formatException(String messageTemplate,Throwable throwable, Object... parameters) {
        return MessageFormatter.arrayFormat(messageTemplate, parameters,throwable).getMessage();
    }
}
